<?php
header("content-type:text/html;charset=utf-8");

// include("zs/zs.html");

// $code=$_GET['code'];
$code="1361107237";
		if($code){

			$client = new SoapClient("http://121.41.41.169:8080/ToyaService.asmx?WSDL");




			$yd_list=array();

			//读取变量
			$param['AppKey']='151d212ca1fe4529c02d6abc';
			$param['Alias']='tytms';		
            $param['MethodName']="ws_Broker_Invoice_Trace_GetTraceByInvoiceCodeAndCompanyCode @CompanyCode='wxzs',@InvoiceCode='".$code."'";
			$param['OptType']="select";
			

			$p = $client->OptMethod($param);
			$list= json_decode(json_encode($p),TRUE);
			
			$list= json_decode($list['OptMethodResult'],TRUE);

	echo "<pre>";
	$list=$list['Data'];
    var_dump($list['Data']);
    echo "</pre>";
			foreach( $list as $key => $value){
			echo "time is ".$value[0]."<br>";
			echo "货物详情：".$value[1]."<br>";


			}



		}




?>
